import { defineStore } from "pinia";
import { ref,reactive } from "vue";
export const useMenuStore = defineStore("menus",()=>{
    const menusName = reactive({});
    const childMenuList = reactive({});
    // 设置菜单
    function setMenus(menu){
        Object.assign(menusName,menu);
    }
    // 设置子菜单
    function setChildMenuList(childMenu){
        Object.assign(childMenuList,childMenu);
    }
    return {
        menusName,
        childMenuList,
        setMenus,
        setChildMenuList,
    };
},{
    persist:[
        {
            key:'menus',
            paths:['menusName'],
        }
    ],
});